Template matching is one of the image identification methods that is extensively used in character and figure recognition because of its simplicity and flexibility. In template matching, the cross-correlation between an input image and a reference image is calculated to form a matching score. A high matching score is taken to indicate a high correlation. However, a problem of this method is that the matching score can be drastically decreased if an image has undergone even a slight shift in position or angle relative to the reference image, markedly reducing the recognition rate.
FIG. 1 illustrates the use of template matching of an input image 11 and reference image 13, each being a horizontal line. The figure shows that the position of the horizontal line in input bit-mapped image 11 differs from that of the reference bit-mapped image 13 by one bit in the vertical plane, but at a glance they appear similar. However, in this case, template matching produces a matching score of 0.0. This makes it difficult to apply template matching to the recognition of handwritten characters and figures, which constantly undergo slight changes.
One technique designed to provide some improvement is the mesh characteristic method of processing input and reference images, a method that predates the template matching method. In the mesh characteristic method, as illustrated by FIG. 2, an input or reference bit-mapped image 15 is divided into a number of small regions and the sum of the values of all pixels or image elements within each region is calculated to produce the mesh pattern 17 of the bit-mapped image 15. This enables small variations to be absorbed.
With reference to FIG. 3, if the mesh characteristic method is used to obtain mesh patterns 15 and 18 based on characteristic quantities of the input bit-mapped image 11 and reference bit-mapped image 13 respectively, and then template matching is applied to the mesh patterns 15 and 18, rather than to the image itself, it is possible to obtain a high matching score even if there are minor variations between input and reference images. Thus, although the matching score of the bit-mapped images 11 and 13 is 0.0, with mesh patterns 15 and 18 a matching score of 1.0 is obtained. This means that mesh patterns obtained by the mesh characteristic method can absorb variation as long as such variation is limited to a small region.
Thus, with the above conventional image processing methods, image matching scores can be improved by absorbing small image variations, but at the same time this gives rise to the following problems.
The mesh characteristic method only absorbs image variations that take place within a small region. Therefore, with reference to the type of situation depicted in FIG. 4 where the discrepancy between the input bit-mapped image 11 and the reference bit-mapped image 19 is spread over two regions, there will also be a discrepancy between the corresponding mesh patterns 15 and 21, resulting in a matching score of 0.0, meaning that discrepancy has not been absorbed.
Also, the method only calculates the sum of the pixel values within each small region, so small differences are not reflected by the output. Hence, even when there is a difference between an input image and an output image, the two images may be processed as being the same. One possible remedy is to increase the number of regions by decreasing the size of the regions of the mesh, but doing this decreases the ability to absorb image variation.
Thus, with respect to absorbing image variation as a prerequisite to image matching with the conventional image processing methods, a major task concerns achieving a performance whereby images that appear similar are output as similar, images that are identical are output as identical, and images that are slightly different are output as slightly different.